package fr.codedarmor;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class CodedarmorActivity extends Activity {

	Button events;
	Button twitter;
	Button notes;
	Button settings;
	
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        events = (Button) findViewById(R.id.events);
        twitter = (Button) findViewById(R.id.twitter);
        notes = (Button) findViewById(R.id.notes);
        settings = (Button) findViewById(R.id.settings);
        
        events.setOnClickListener(listener);
        twitter.setOnClickListener(listener);
        notes.setOnClickListener(listener);
        settings.setOnClickListener(listener);
        
    }
    
    OnClickListener listener = new OnClickListener() {
		
		@Override
		public void onClick(View view) {
			// TODO create the real activitie and change that  
			
			if (view == events) {
				Toast toast = Toast.makeText(CodedarmorActivity.this, "monter les évènements", Toast.LENGTH_SHORT);
				toast.show();
			}
			if (view == twitter) {
				Toast toast = Toast.makeText(CodedarmorActivity.this, "monter les tweets", Toast.LENGTH_SHORT);
				toast.show();
			}
			if (view == notes) {
				Toast toast = Toast.makeText(CodedarmorActivity.this, "lancer une appli de notes", Toast.LENGTH_SHORT);
				toast.show();
			}
			if (view == settings) {
				Toast toast = Toast.makeText(CodedarmorActivity.this, "monter les préférences", Toast.LENGTH_SHORT);
				toast.show();
			}
			
			
		}
	};
}